package _05_genList;

public class GenNode<T> {
    
    // 数据域
    public T data;
    // 地址域，指向子表
    public GenList<T> child;
    // 地址域，指向后继结点
    public GenNode<T> next;
    
    // 构造方法
    public GenNode(T data, GenList<T> child, GenNode<T> next) {
        this.data = data;
        this.child = child;
        this.next = next;
    }
    
    public GenNode() {
        this.data = null;
        this.child = null;
        this.next = null;
    }
    
    public String toString() {
        return this.child == null ? this.data.toString() : this.child.toString();
    }

    public static void main(String[] args) {
        // TODO Auto-generated method stub

    }

}
